package com.mmy.service.oa.impl;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.mmy.dao.oa.RewardTypeRepository;
import com.mmy.domain.oa.RewardType;
import com.mmy.service.oa.RewardTypeService;

@Service
public class RewardTypeServiceImpl implements RewardTypeService {

	@Autowired
	RewardTypeRepository rewardTypeRepository;

	/**
	 * 查找全部
	 * 
	 * @param
	 * @return
	 */
	public List<RewardType> findAll() {
		// TODO Auto-generated method stub
		return rewardTypeRepository.findAll();
	}

	/**
	 * 获取最大值
	 * 
	 * @param
	 * @return
	 */

	public Object getMaxTypeID() {
		// TODO Auto-generated method stub
		return rewardTypeRepository.getMaxTypeID();
	}

	/**
	 * 根据名称查找
	 * 
	 * @param
	 * @return
	 */
	public List<RewardType> findByTypeName(String strTypeName) {
		// TODO Auto-generated method stub
		return rewardTypeRepository.findByTypeName(strTypeName);
	}

	/**
	 * 新增id
	 * 
	 * @param
	 * @return
	 */
	public void save(int typeID) {
		// TODO Auto-generated method stub
		rewardTypeRepository.save(typeID);
	}

	/**
	 * 新增
	 * 
	 * @param
	 * @return
	 */
	public void save(RewardType rewardType) {
		// TODO Auto-generated method stub
		rewardTypeRepository.save(rewardType);
	}

	/**
	 * 删除
	 * 
	 * @param
	 * @return
	 */

	public void delRewardType(List<Integer> lstTypeID) {
		// TODO Auto-generated method stub
		rewardTypeRepository.delRewardType(lstTypeID);
	}

	/**
	 * 通过id查找
	 * 
	 * @param
	 * @return
	 */
	public RewardType findByTypeID(int iTypeID) {
		// TODO Auto-generated method stub
		return rewardTypeRepository.findByTypeID(iTypeID);
	}
}
